/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package src.tarea1;

/**
 *
 * @author jorgeorm
 */
public class Clase {
    private double cotaInf, cotaSup;
    
    public Clase(double cotaInf, double cotaSup){
        this.cotaInf=cotaInf;
        this.cotaSup= cotaSup;
    }
    
    public Clase(){
        
    }

    public double getCotaInf() {
        return cotaInf;
    }

    public void setCotaInf(double cotaInf) {
        this.cotaInf = cotaInf;
    }

    public double getCotaSup() {
        return cotaSup;
    }

    public void setCotaSup(double cotaSup) {
        this.cotaSup = cotaSup;
    }
    
    public boolean pertenece(double dato){
        boolean retorno;
        
        retorno= dato > cotaInf && dato <= cotaSup;
        
        return retorno;
    }
    
    public boolean menorQue(double dato){
        if(cotaSup<dato){
            return true;
        }else {
            return false;
        }
    }
    
    public boolean mayorQue(double dato){
        if(cotaInf>dato){
            return true;
        }
        else {
            return false;
        }
    }
    
    @Override
    public String toString(){
        String respuesta="["+cotaInf+", "+cotaSup+")";
        return respuesta;
    }
    
}
